<%= render :partial => 'sub_nav' %>

<div id="index_milestones">
	<div id="mini_right">
		<h1>Milestones</h1>
		<h3>Over a decade of industry experience</h3>
	</div>
	<div id="mini_left">
		<%= image_tag "/images/milestones_60x60.png" %>
	</div>
	
	<ul class="left">
		<li class="horizontal">
			<%= link_to_function "open all" do |page|
				 		@milestones.each do |milestone|
					 		page["milestone_body_#{ milestone.id }"].visual_effect :blind_down
						end
					end
			%>
		</li>
		<li class="horizontal">|</li>
		<li class="horizontal">
			<%= link_to_function "close all" do |page|
				 		@milestones.each do |milestone|
					 		page["milestone_body_#{ milestone.id }"].visual_effect :blind_up
						end
					end
			%>
		</li>
	</ul>

	<div id="milestones">
		<% @milestones.each do |m| %>
			<div id="border_top"><!-- Image for top border.  See CSS. --></div>
			<div class="milestone" id="milestone_<%= m.id %>">
				<div class="milestone_headline">
					<%= link_to_function m.headline do |page| 
								page["milestone_body_#{ m.id }"].visual_effect :blind_down
								page["milestone_body_#{ m.id }"].visual_effect :highlight 
							end %>
				</div>
				<div class="milestone_year"><%= m.year %></div>
			</div>
			<div id="border_bottom"><!-- Image for bottom border.  See CSS. --></div>
			<div class="milestone_body" id="milestone_body_<%= m.id %>" style="display:none">

				<ul class="left">
					<li class="horizontal">
						<%= link_to_function "close" do |page| 
									page["milestone_body_#{ m.id }"].visual_effect :blind_up 
								end 
						%>
					</li>
				</ul>
				
				<div class="text_area">
					<%= m.body %>
				</div>
			</div>
		<% end %>
	</div>
</div>